#include "SelfEffect.h"

using namespace cocos2d;
using namespace std;


void CEffectRotate::runEffect( cocos2d::CCSprite* pTarget, float fSpeedTime )
{
	CCFiniteTimeAction* pAction = CCRotateBy::create(fSpeedTime,360);
	pTarget->runAction(pAction);
}

void CEffectTurnOverX::runEffect( cocos2d::CCSprite* pTarget, float fSpeedTime )
{
	CCFiniteTimeAction* pAction = CCOrbitCamera::create(fSpeedTime,1, 0, 0,180,0, 0);
	pTarget->runAction(pAction); 
}

void CEffectTurnOverY::runEffect( cocos2d::CCSprite* pTarget, float fSpeedTime )
{
	CCFiniteTimeAction* pAction = CCOrbitCamera::create(fSpeedTime,1, 0, 0,0,180, 0);
	pTarget->runAction(pAction); 
}

void CEffectAngle::runEffect( cocos2d::CCSprite* pTarget, float fSpeedTime )
{
	CCFiniteTimeAction* pAction = CCRotateTo::create(0.01,m_angle);
	pTarget->runAction(pAction); 
}

void CEffectFlipX::runEffect( cocos2d::CCSprite* pTarget, float fSpeedTime )
{
	CCFiniteTimeAction* pAction = CCFlipX::create(true);
	pTarget->runAction(pAction); 
}

void CEffectFlipY::runEffect( cocos2d::CCSprite* pTarget, float fSpeedTime )
{
	CCFiniteTimeAction* pAction = CCFlipY::create(true);
	pTarget->runAction(pAction); 
}

void CEffectScaleX::runEffect( cocos2d::CCSprite* pTarget, float fSpeedTime )
{
	CCFiniteTimeAction* pAction = CCScaleBy::create(0.001, m_scale,1);
	pTarget->runAction(pAction); 
}

void CEffectScaleY::runEffect( cocos2d::CCSprite* pTarget, float fSpeedTime )
{
	CCFiniteTimeAction* pAction = CCScaleBy::create(0.001, 1, m_scale);
	pTarget->runAction(pAction); 
}
